package com.tools.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.tools.dao.ThemeDao;
import com.tools.entity.Theme;
import com.tools.mapper.ThemeMapper;

@Repository("themeDao")
public class ThemeDaoImpl implements ThemeDao {
    
    @Resource(name = "themeMapper")
    private ThemeMapper themeMapper;
    
    public List<Theme> getAll() {
        return themeMapper.getAll();
    }
    
    public int insert(Theme theme) {
        // TODO Auto-generated method stub
        return themeMapper.insert(theme);
    }
    
    public int delete(int id) {
        // TODO Auto-generated method stub
        return themeMapper.delete(id);
        
    }
    
    public Theme fetchById(int id) {
        // TODO Auto-generated method stub
        return themeMapper.fetchById(id);
    }
    
    public int update(Theme theme) {
        // TODO Auto-generated method stub
        return themeMapper.update(theme);
    }
}
